css make hover on parent child move

60

/* Selecting a child element on :hover parent element*/ 
.parent:hover .child {
   /* ... */
}
.parent {
    background: white;
    pointer-events: none; // this disable the hover on the .parent

    &:hover {
      background: gray; // hover applied to .parent but disabled by the previous pointer-events: none;
    }
    a {
      pointer-events: auto; // this enable the pointer again
      &:hover {
        color: red; // this hover only for the a 
      }
    }
}

Comments

Submit
0 Comments